Vendor-Specified License Installation/Loading on the License Manager
Using the VLSpolicyLicenseInstall function, you can customize the installing/loading of licenses on the License Manager.
Executables to Rebuild
The License Manager executable needs to be rebuild. Refer to the How to Use the custom32.mak File?
Description
The vendor can use this API to determine any of the following behavior:
>Whether the license being installed by License Manager should be added to the License Manager license table
>Or, the license being installed by License Manager should be ignored by the License Manager
>Or, the License Manager should be stopped (recommended only in rare cases)
This decision can be taken by the vendor on the basis of the parameters described below. Note that the default behavior of the License Manager is to add the license.
Function Prototype
VLS_POLICY_LIC_INSTALL_STATUS VLSpolicyLicenseInstall (
unsigned char *license_string,
VLSlicenseInfo license_info,
VLS_POLICY_LIC_INSTALL_SCENARIO licInstallScenario );
Argument | Direction | Data Type | Description |
---|---|---|---|
license_string | IN | unsigned char* | The license string to be installed. |
license_info | IN | VLSlicenseInfo |
An object of type VLSlicenseInfo for the license being installed. |
licInstallScenario | IN | VLS_POLICY_LIC_INSTALL_SCENARIO |
The scenarios of license installation can be as follows: >VLS_POLICY_LIC_INSTALL_SERVER_STARTUP - When license is read from the license file (including the redundant License Manager file lservrlf) at the time of License Manager start up. >VLS_POLICY_LIC_INSTALL_DYNAMIC_ADDITION - When license is added dynamically (using the API or utilities like lslic). |
Returns
The License Manager will take the appropriate action as implied by the return value of function:
>VLS_POLICY_LIC_INSTALL_ADD_LICENSE - Adds the license
>VLS_POLICY_LIC_INSTALL_IGNORE_LICENSE - Does not add the license. On Windows, the Event viewer will log the following warning message “The License install policy has ignored this license”. When the license is added dynamically, error 19 (VLS_ADD_LIC_FAILED) will also be thrown.
Corresponding to the Event Viewer messages, if tracing is on, trace messages (VLS_TRACE_FUNCTIONS) will be logged in the trace file on both Windows and UNIX.
>VLS_POLICY_LIC_INSTALL_STOP_SERVER - Stops the License Manager. In this case:
•Windows Event viewer will log the following error message “The Sentinel RMS License Manager was stopped by the license install policy”. The corresponding license string (that could not be added) can be found under the Event details.
•The License Manager will gracefully exit releasing all its resources and a call to the custom function VLSserverVendorFinalize will also be made.
Steps to Perform
1. Create the VLSpolicyLicenseInstall function.
2. Update the LIC_INSTALL_POLICY_OBJS variable in the custom32.mak file.
3.Follow the build procedure specified in How to Use the custom32.mak File?.
Code Snippet
VLS_POLICY_LIC_INSTALL_STATUS VLSpolicyLicenseInstall (
unsigned char *license_string,
VLSlicenseInfo license_info,
VLS_POLICY_LIC_INSTALL_SCENARIO licInstallScenario )
{
/* TODO: add vendor-specific implementation of license installation*/
returns any of the values defined above;
}